/**
 * 
 */
package de.cbf.cam.dsa.facet.container.persister.mock.service;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;

import de.cbf.cam.dsa.facet.container.persister.mock.ServicePersister_FacetContainer_Mock;
import de.cbf.cam.dsa.facet.container.service.persister_interface.IServicePersister_FacetContainer;

/**
 * @author Nebelritter
 *
 */
public class ServiceFactoryPersister_FacetContainer_Mock implements ServiceFactory<IServicePersister_FacetContainer> {

	protected ServicePersister_FacetContainer_Mock service;

	@Override
	public IServicePersister_FacetContainer getService(Bundle bundle,
			ServiceRegistration<IServicePersister_FacetContainer> registration) {
		if(service == null){
			service = new ServicePersister_FacetContainer_Mock();		
		}
		return service;
	}

	@Override
	public void ungetService(Bundle bundle,
			ServiceRegistration<IServicePersister_FacetContainer> registration,
			IServicePersister_FacetContainer service) {
		this.service = null;		
	}	
}
